<%@ page contentType="text/html;charset=UTF-8" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<base href="<%=basePath%>">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>能动英语客户资源管理系统</TITLE>
<meta name="keywords" content="">
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link href="css/login.css" rel="stylesheet" type="text/css">
</head>
<body onload=document.form1.username.focus();>
<div class="login">
<form action="${pageContext.request.contextPath}/j_spring_security_check" method="post" id="loginForm">
	<div class="logo"></div>
    <div class="login_form">
    	<div class="user">
        	<input class="text_value" value="" name="j_username" type="text" id="j_username" placeholder="用户名">
            <input class="text_value" value="" name="j_password" type="password" id="j_password" placeholder="密码">
        </div>
        <button class="button" id="submit" type="submit" >登录</button>
    </div>
    
    <div id="tip"></div>
    <div class="foot">
	Copyright &copy; 2014.能动英语
    </div>
    </form>
</div>
<script>var basedir='ui/';</script>
<script src="ui/do.js"></script>
<script src="ui/config.js"></script>
<script>
Do.ready('form', function() {
	$("#form").Validform({
			ajaxPost:true,
			postonce:true,
			tiptype:function(msg,o,cssctl){
				if(!o.obj.is("form")){
					var objtip=o.obj.siblings(".Validform_checktip");
					cssctl(objtip,o.type);
					objtip.text(msg);
				}else{
					var objtip=o.obj.find("#tip");
					cssctl(objtip,o.type);
					if(o.type==2){
						window.location.href='index.php?r=admin/index/index';
					}else{
						objtip.text(msg);
					}
				}
			}
	});
});

</script>
</body>
</html>